package com.py.credit.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.py.credit.dao.CreditStandardCommitmentDao;
import com.py.credit.entity.CreditStandardCommitment;
import com.py.credit.service.CreditStandardCommitmentService;
import com.py.framework.core.common.Page;

@Service
public class CreditStandardCommitmentServiceImpl implements CreditStandardCommitmentService {

	@Autowired
	private CreditStandardCommitmentDao creditStandardCommitmentDao;

	@Transactional
	@Override
	public void insert(CreditStandardCommitment CreditStandardCommitment) {
		creditStandardCommitmentDao.insert(CreditStandardCommitment);
	}

	@Override
	public List<CreditStandardCommitment> selectForPage(CreditStandardCommitment creditStandardCommitment, Page page) {
		return creditStandardCommitmentDao.selectForPage(creditStandardCommitment, page);
	}

	@Override
	public List<CreditStandardCommitment> selectByStateForPage(CreditStandardCommitment creditStandardCommitment,
			Page page) {
		return creditStandardCommitmentDao.selectByStateForPage(creditStandardCommitment, page);
	}

	@Transactional
	@Override
	public void delListById(List<String> list) {
		creditStandardCommitmentDao.delListById(list);
	}

	@Override
	public void updateById(CreditStandardCommitment creditStandardCommitment) {
		creditStandardCommitmentDao.updateById(creditStandardCommitment);

	}

	@Override
	public CreditStandardCommitment selectById(Integer id) {
		return creditStandardCommitmentDao.selectById(id);
	}

	@Override
	public CreditStandardCommitment selectByType() {
		return creditStandardCommitmentDao.selectByType();
	}

	@Override
	public List<CreditStandardCommitment> selectCriterionForPage(CreditStandardCommitment creditStandardCommitment,
			Page page) {
		return creditStandardCommitmentDao.selectCriterionForPage(creditStandardCommitment, page);
	}

	@Override
	public List<CreditStandardCommitment> selectCriterionByStateForPage(
			CreditStandardCommitment creditStandardCommitment, Page page) {
		return creditStandardCommitmentDao.selectCriterionByStateForPage(creditStandardCommitment, page);
	}

	@Override
	public void updateStateById(Integer id, String state) {
		creditStandardCommitmentDao.updateStateById(id, state);
	}

	@Override
	public List<CreditStandardCommitment> selectContentsByStateForPage(
			CreditStandardCommitment creditStandardCommitment, Page page) {
		return creditStandardCommitmentDao.selectContentsByStateForPage(creditStandardCommitment, page);
	}

	@Override
	public List<CreditStandardCommitment> selectContentsForPage(CreditStandardCommitment creditStandardCommitment,
			Page page) {
		return creditStandardCommitmentDao.selectContentsForPage(creditStandardCommitment, page);
	}

	@Override
	public CreditStandardCommitment selectByMlType() {
		return creditStandardCommitmentDao.selectByMlType();
	}

	@Override
	public CreditStandardCommitment selectOneById(String id) {
		return creditStandardCommitmentDao.selectOneById(id);

	}

	@Transactional
	@Override
	public void updateOneById(String id) {
		creditStandardCommitmentDao.updateOneById(id);
	}

}
